package org.spring.boot.sample.profile;

import org.spring.boot.sample.profile.config.WebConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.ImportResource;
import org.springframework.context.annotation.Profile;

@SpringBootApplication
@EnableAutoConfiguration
@EnableConfigurationProperties({ WebConfig.class})
@ImportResource({"classpath:dubbo-consumer.xml"})
// 帮助SpringBoot应用将所有符合条件的@Configuration配置都加载到当前SpringBoot创建并使用的IoC容器
@Profile("prod")
public class Application {
    
	@Autowired
	private WebConfig webConfig;
	
	public static void main(String[] args) {
		SpringApplication.run(Application.class, args);
	}
}
